/*
 * Copyright (c) 2006, 2023, webrx.cn All rights reserved.
 *
 */
package org.wxwp;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * <p>Project: jse2302 - StuDemo
 * <p>Powered by webrx On 2023-06-19 09:34:33
 * <p>Created by IntelliJ IDEA
 *
 * @author  webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class StuDemo {
    public static void main(String[] args) {
        //使用lombok @Data
        Student st = new Student(10, "jack", 95);
        System.out.println(st);

        Student zs = Student.builder().id(100).score(88).name("张三丰").build();
        System.out.println(zs);

        Student ls = new Student();
        ls.setId(3);
        ls.setScore(33);
        ls.setName("李四");
        System.out.println();

        //使用的java 14新加的技术record
        Stu s1 = new Stu(10, "赵六", 55);

        System.out.println(s1);

        //声明record
        record order(int id,double money){}
        System.out.println(new order(11,108));

        //lombok使用
        @Data @AllArgsConstructor @NoArgsConstructor
        class myorder{
            private int id;
            private double money;
        }
        System.out.println(new myorder(55,99));


    }
}
